﻿@model CandidateManager.Areas.Coach.Models.GroupAssignModel

@{
    ViewBag.Title = "Assign To Groups";
}

<h2>AssignCandidates</h2>

@using (Html.BeginForm("AssignToGroups", "Homeworks", new { @TaskId = Model.Task.Id }, FormMethod.Post))
{
    @Html.ValidationSummary(true)
        
    <table class="bordered">
        <thead>
            <tr>
                <th></th>
                <th>Group Name</th>
                <th>Group Description</th>
            </tr>
        </thead>
        @for (int c = 0; c < Model.GroupCheckList.Count; c++)
        {
            @Html.HiddenFor(model => model.GroupCheckList[c].GroupId)
            <tr>
                <td>@Html.EditorFor(model => model.GroupCheckList[c].IsChecked)</td>
                <td>@Model.GroupCheckList[c].Group.GroupName</td>
                <td>@Model.GroupCheckList[c].Group.Description</td>
            </tr>        
        }
    </table>
    
    <p>
        @Html.ActionLink(@Resources.Common.CommonButtonCancel, "Assign", new { @HomeworkId = Model.Task.Id }, new { @class = "common-btn-large BlueColor" }) <input class="common-btn-large BlueColor" type="submit" value=@Resources.Common.CommonButtonSave />
    </p>
}